/* vue */
import { ref, Ref } from "vue"

export function useDialog() {
  
  const visible: Ref<boolean> = ref(false)
  
  const showDialog = () => {
    visible.value = true
  }
  
  const hideDialog = () => {
    visible.value = false
  }
  
  const changeVisible = (value: boolean) => {
    visible.value = value
  }
  
  return {
    visible,
    showDialog,
    hideDialog,
    changeVisible
  }
}